#ifndef NETDRIVER_H
#define NETDRIVER_H

#include <QObject>
class QTcpSocket;
class netDriver : public QObject
{
    Q_OBJECT
public:
    explicit netDriver(QObject *parent = nullptr);
    static netDriver *getObject();
bool netConnect(QString ip,quint16 port);
void netDisconnect();
bool netWrite(const QByteArray &data);
bool netGetState();
protected:
    static netDriver *obj;
    QTcpSocket *client;

signals:
void netRead(QByteArray data);
public slots:
   void  netReadyReadSlot();
};

#endif // NETDRIVER_H
